function minSize(target:MovieClip, minWidth:Number, minHeight:Number):Number
{
	Packages.log("minSize: "+target+" "+minWidth+" "+minHeight, "debug");
	
	var scaleDegree:Number=100;

	var widthScaleDegree:Number=minWidth/target._width;
	var heightScaleDegree:Number=minHeight/target._height;

	var minScaleDegree=Math.min(widthScaleDegree, heightScaleDegree);

	if (minScaleDegree<1)
	{
		scaleDegree=minScaleDegree*100;
	}

	// round fix
	scaleDegree=Math.round(scaleDegree);
	
	return scaleDegree;
}